function usable_dataset = rslice_file_datasets( ncfile )


netcdf_file_info = nc_info ( ncfile );
Dataset = netcdf_file_info.Dataset;


%
% Count the number of usable datasets
num_usable_vars = 0;
num_vars = length(Dataset );

usable_dataset = [];

first_non_grid_variable = 1;
for j = 1:num_vars


	%
	% Skip certain variables.
	switch ( Dataset(j).Name )
	case { 'lon_rho', 'lat_rho', 'lon_u', 'lat_u', 'lon_v', 'lat_v' }
		continue
	end

	dim_type = rslice_classify_variable ( Dataset(j) );
	switch ( dim_type )
	case { 'YX', 'ZYX' }
        continue;

	case { 'TZYX', 'TYX' }

		num_usable_vars = num_usable_vars + 1;
		usable_dataset{num_usable_vars} = Dataset(j).Name;

	end
end

if length(usable_dataset) == 0
	error ( '%s:  No usable datasets were found.\n', mfilename );
end

return




